﻿using System;


namespace OurSite.Business.Helper
{
    public static class HelperUtilities
    {
        public static string ReplaceSpecialCharacters(string s)
        {
            s = s.Replace(" ", "");
            s = s.Replace("&", "");
            s = s.Replace("/", "");
            s = s.Replace("\\", "");
            s = s.Replace("'", "");
            return s;
        }

        public static string MakeURLFriendly(string s)
        {
            s = s.Replace(" ", "_");
            s = s.Replace("&", "^");
            s = s.Replace("/", "~");
            s = s.Replace(".", "$");
            s = s.Replace("\"", "!");
            return s;
        }

        public static string ReverseURLFriendly(string s)
        {
            s = s.Replace("_", " ");
            s = s.Replace("^", "&");
            s = s.Replace("~", "/");
            s = s.Replace("$", ".");
            s = s.Replace("!", "\"");
            return s;
        }

    }

}
